package entity

import (
	"time"
)

// RoleMenu [...]
type RoleMenu struct {
	ID        uint64    `gorm:"primaryKey;column:id" json:"-"`
	CreatedAt time.Time `gorm:"column:created_at" json:"createdAt"`
	UpdatedAt time.Time `gorm:"column:updated_at" json:"updatedAt"`
	RoleID    uint64    `gorm:"column:role_id" json:"roleId"`
	MenuID    uint64    `gorm:"column:menu_id" json:"menuId"`
	ActionID  uint64    `gorm:"column:action_id" json:"actionId"`
}

// TableName get sql table name.获取数据库表名
func (m *RoleMenu) TableName() string {
	return "role_menu"
}

// RoleMenuColumns get sql column name.获取数据库列名
var RoleMenuColumns = struct {
	ID        string
	CreatedAt string
	UpdatedAt string
	RoleID    string
	MenuID    string
	ActionID  string
}{
	ID:        "id",
	CreatedAt: "created_at",
	UpdatedAt: "updated_at",
	RoleID:    "role_id",
	MenuID:    "menu_id",
	ActionID:  "action_id",
}
